package zdh.jfinabbsapp.api.dao;

import java.util.ArrayList;
import java.util.List;

/**
 * 作者：zdh1000
 * 创建时间： 2015/6/29 20:09
 * 邮箱：wdzdh1000@163.com
 */
//一个主题，意思就是一个帖子，包含着回复
//主题详情类
public class Topic extends GeneralTopic{
	//积分
    private int score=0;
	//作者简介
    private String signature;
	//
    private List<Reply> replies;

	public Topic()
    {
        setReplies(new ArrayList<Reply>());
    }

    public void addReply(Reply reply)
    {
        if(getReplies() == null)
        {
            setReplies(new ArrayList<Reply>());
        }
        getReplies().add(reply);
    }

    public Reply getReply(int index)
    {
        if(getReplies() == null)
        {
            return null;
        }
        return getReplies().get(index);
    }

    public int getScore() {
        return score;
    }

    public void setScore(int score) {
        this.score = score;
    }

    public String getSignature() {
        return signature;
    }

    public void setSignature(String signature) {
        this.signature = signature;
    }

    public List<Reply> getReplies() {
        return replies;
    }

    public void setReplies(List<Reply> replies) {
        this.replies = replies;
    }
}
